home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm)))) ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- clAddAlgorithm, clSetUnique, clGetUnique, clFetchParam, clStoreParam,
- clError - Add a video or audio compression algorithm to the Compression
- Library
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>>
-
- iiiinnnntttt ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt aaaallllggggTTTTyyyyppppeeee,,,, iiiinnnntttt mmmmaaaaxxxxHHHHeeeeaaaaddddeeeerrrrSSSSiiiizzzzeeee,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ooooppppeeeennnnCCCCoooommmmpppprrrreeeessssssssoooorrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ccccoooommmmpppprrrreeeessssssss,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr cccclllloooosssseeeeCCCCoooommmmpppprrrreeeessssssssoooorrrr,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ooooppppeeeennnnDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ddddeeeeccccoooommmmpppprrrreeeessssssss,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr cccclllloooosssseeeeDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr rrrreeeeaaaaddddHHHHeeeeaaaaddddeeeerrrr,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr qqqquuuueeeerrrryyyySSSScccchhhheeeemmmmeeee,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr qqqquuuueeeerrrryyyyLLLLiiiicccceeeennnnsssseeee,,,,
- FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr ggggeeeettttPPPPaaaarrrraaaammmmssss,,,, FFFFuuuunnnnccccttttiiiioooonnnnPPPPttttrrrr sssseeeettttPPPPaaaarrrraaaammmmssss,,,,
- iiiinnnntttt ****sssscccchhhheeeemmmmeeee))))
-
- vvvvooooiiiidddd ****ccccllllSSSSeeeettttUUUUnnnniiiiqqqquuuueeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, vvvvooooiiiidddd ****uuuunnnniiiiqqqquuuueeee))))
- vvvvooooiiiidddd ****ccccllllGGGGeeeettttUUUUnnnniiiiqqqquuuueeee((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee))))
-
- iiiinnnntttt ccccllllFFFFeeeettttcccchhhhPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
- vvvvooooiiiidddd ccccllllSSSSttttoooorrrreeeePPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt vvvvaaaalllluuuueeee))))
-
- vvvvooooiiiidddd ccccllllEEEErrrrrrrroooorrrr((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ccccooooddddeeee,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffoooorrrrmmmmaaaatttt,,,, ............))))
-
-
- AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
- _n_a_m_e A pointer to a string that contains the name of the
- algorithm.
-
- _a_l_g_T_y_p_e The type of the algorithm (CCCCLLLL____AAAALLLLGGGG____VVVVIIIIDDDDEEEEOOOO or CCCCLLLL____AAAALLLLGGGG____AAAAUUUUDDDDIIIIOOOO).
-
- _m_a_x_H_e_a_d_e_r_S_i_z_e The maximum size of the stream header for the specified
- algorithm.
-
- _o_p_e_n_C_o_m_p_r_e_s_s_o_r A pointer to the function that opens a compressor for the
- new algorithm. The function must have the same arguments
- as ccccllllOOOOppppeeeennnnCCCCoooommmmpppprrrreeeessssssssoooorrrr.
-
- _c_o_m_p_r_e_s_s A pointer to the function that compresses for the new
- algorithm. The function must have the same arguments as
- ccccllllCCCCoooommmmpppprrrreeeessssssss.
-
- _c_l_o_s_e_C_o_m_p_r_e_s_s_o_r
- A pointer to the function that closes a compressor for the
- new algorithm. The function must have the same arguments
- as ccccllllCCCClllloooosssseeeeCCCCoooommmmpppprrrreeeessssssssoooorrrr.
-
- _o_p_e_n_D_e_c_o_m_p_r_e_s_s_o_r
- A pointer to the function that opens a decompressor for
- the new algorithm. The function must have the same
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm)))) ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm))))
-
-
-
- arguments as ccccllllOOOOppppeeeennnnDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr.
-
- _d_e_c_o_m_p_r_e_s_s A pointer to the function that decompresses for the new
- algorithm. The function must have the same arguments as
- ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssss.
-
- _c_l_o_s_e_D_e_c_o_m_p_r_e_s_s_o_r
- A pointer to the function that closes a decompressor for
- the new algorithm. The function must have the same
- arguments as ccccllllCCCClllloooosssseeeeDDDDeeeeccccoooommmmpppprrrreeeessssssssoooorrrr.
-
- _r_e_a_d_H_e_a_d_e_r A pointer to the function that reads the stream header for
- the new algorithm. The function must have the same
- arguments as ccccllllRRRReeeeaaaaddddHHHHeeeeaaaaddddeeeerrrr.
-
- _q_u_e_r_y_S_c_h_e_m_e A pointer to the function that identifies the scheme from
- the stream header for the new algorithm. The function must
- have the same arguments as ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeee.
-
- _q_u_e_r_y_L_i_c_e_n_s_e A pointer to the function that checks for a NetLS license.
- The function must have the same arguments as
- ccccllllQQQQuuuueeeerrrryyyyLLLLiiiicccceeeennnnsssseeee.
-
- _g_e_t_P_a_r_a_m_s A pointer to the function that gets
- compressor/decompressor parameters for the new algorithm.
- The function must have the same arguments as ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss.
-
- _s_e_t_P_a_r_a_m_s A pointer to the function that sets
- compressor/decompressor parameters for the new algorithm.
- The function must have the same arguments as ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss.
-
- _s_c_h_e_m_e A pointer to an int value to receive the compression
- scheme identifier.
-
- _h_a_n_d_l_e A handle to a compressor/decompressor.
-
- _u_n_i_q_u_e A pointer to the unique data structure used by the
- algorithm.
-
- _p_a_r_a_m_I_D The parameter identifier.
-
- _v_a_l_u_e The new value of the parameter.
-
- _c_o_d_e The error code as specified in cl.h. For errors not
- handled by the standard list, use
- CCCCLLLL____AAAADDDDDDDDEEEEDDDD____AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMM____EEEERRRRRRRROOOORRRR.
-
- _f_o_r_m_a_t A printf style format string.
-
- ... Parameters to the printf style format string.
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm)))) ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm))))
-
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Users can add compression algorithms to the compression library by using
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm. When the user calls the compression library for this
- added algorithm, some preprocessing is done and then the routines passed
- to ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm are called.
-
- ccccllllSSSSeeeettttUUUUnnnniiiiqqqquuuueeee and ccccllllGGGGeeeettttUUUUnnnniiiiqqqquuuueeee allow the algorithm implementation to store
- and retrieve algorithm-specific information with each instantiation of a
- compressor or decompressor. _o_p_e_n_C_o_m_p_r_e_s_s_o_r and _o_p_e_n_D_e_c_o_m_p_r_e_s_s_o_r should
- set the unique pointer to initialize algorithm-specific storage. Other
- calls such as _c_o_m_p_r_e_s_s and _d_e_c_o_m_p_r_e_s_s should get the unique pointer if
- they need to access the information from the handle.
-
- ccccllllFFFFeeeettttcccchhhhPPPPaaaarrrraaaammmm and ccccllllSSSSttttoooorrrreeeePPPPaaaarrrraaaammmm permit algorithm implementations to access
- a handle's parameters directly, with minimal overhead. Users of the
- codec, however, should call the standard routines ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm and
- ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm instead.
-
- ccccllllEEEErrrrrrrroooorrrr is used by new algorithm implementations to report errors.
- Generally, the _f_o_r_m_a_t string starts with the cl routine name within which
- the error occurred followed by a description of the error.
-
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm returns SUCCESS, or a negative error code on failure.
- ccccllllSSSSeeeettttUUUUnnnniiiiqqqquuuueeee returns the previous unique pointer, or NULL on failure.
- ccccllllGGGGeeeettttUUUUnnnniiiiqqqquuuueeee returns the current unique pointer, or NULL on failure.
- ccccllllFFFFeeeettttcccchhhhPPPPaaaarrrraaaammmm returns the parameter value.
-
-
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEE
- #include <dmedia/cl.h>
- ...
- int newScheme;
- ...
- /* Add the new algorithm */
- clAddAlgorithm("New Algorithm", CL_ALG_VIDEO,
- NEW_ALGORITHM_MAX_HEADER_SIZE,
- OpenNewCompressor, CompressNew, CloseNewCompressor,
- OpenNewDecompressor, DecompressNew, CloseNewDecompressor,
- ReadNewHeader, QueryNewScheme, QueryNewLicense,
- GetNewParams, SetNewParams,
- &newScheme);
-
- /* Compress a series of frames */
- clOpenCompressor(newScheme, &handle);
- for(i = 0; i < numberOfFrames; i++)
- {
- /* Get a frame from somewhere */
- ...
- clCompress(handle, 1, frameBuffer, &compressedBufferSize,
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm)))) ccccllllAAAAddddddddAAAAllllggggoooorrrriiiitttthhhhmmmm((((3333ddddmmmm))))
-
-
-
- compressedBuffer);
- /* Write the compressed data to somewhere else */
- ...
- }
- clCloseCompressor(handle);
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- CLintro(3dm), clOpenCompressor(3dm), clCompress(3dm),
- clCloseCompressor(3dm), clOpenDecompressor(3dm), clDecompress(3dm),
- clCloseDecompressor(3dm), clReadHeader(3dm), clQueryScheme(3dm),
- clQueryLicense(3dm), clGetParams(3dm), clSetParams(3dm) clAddParam(3dm),
- clSetDefault(3dm), clSetMin(3dm), clSetMax(3dm), clSetMinMax(3dm),
- clSetRange(3dm)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-